﻿using Service.src.NW.Enum;
using SqlSugar;

namespace Service.src.NW.Model.Drive
{

    /// <summary>
    /// plc设备下的地址
    /// </summary>
    [SugarTable("sys_device_plc_address")]
    public class SysPlcDriverAddress : BaseEntity
    {
        /// <summary>
        /// 驱动类型 plc
        /// </summary>
        [SugarColumn(ColumnName = "device_type")]
        public DeviceTypeEnum DriverType { get; set; }

        [SugarColumn(ColumnName = "device_id")]
        public int DriverId { get; set; }

        /// <summary>
        /// 地址名称
        /// </summary>
        [SugarColumn(ColumnName = "name")]
        public string Name { get; set; }

        [SugarColumn(ColumnName = "address")]
        public string Address { get; set; }

        [SugarColumn(ColumnName = "desc")]
        public string Desc { get; set; }

        /// <summary>
        /// 是否轮询写值
        /// </summary>
        [SugarColumn(ColumnName = "cycle")]
        public bool Cycle { get; set; }

        /// <summary>
        /// 轮询时间
        /// </summary>
        [SugarColumn(ColumnName = "cycle_time")]
        public int CycleTime { get; set; }

        /// <summary>
        /// 值类型
        /// 单个值/多个值
        /// </summary>
        [SugarColumn(ColumnName = "value_type")]
        public string ValueType { get; set; }

        [SugarColumn(ColumnName = "value1")]
        public string Value1 { get; set; }

        [SugarColumn(ColumnName = "value2")]
        public string Value2 { get; set; }
    }
}
